const {ccclass, property} = cc._decorator;
import enumMode from "../../../em/enumMode"
import supMount from "../../../sup/supMount";
import gameModule from "./gameModule"
@ccclass
export default class jymtLoadingMount extends supMount {
    @property(cc.ProgressBar)
    bar:cc.ProgressBar = null;
    private finsh:boolean = false;
    
    update(dt){
        if(!this.finsh){
            this.bar.progress = Math.min(1,this.bar.progress+(dt/2));;
            if(1 == this.bar.progress){
                let mod:gameModule = this.getModule(enumMode.jymtGameMoudle)
                if(!mod){
                    mod = new gameModule()
                }
                this.finsh = true;
                mod.changeStart();
            }
        }
    }
}
